<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>标准时间格式ISO和时间戳的相互转换</title>
</head>
<body>
    <script>
        // 转化为时间戳
        let date = new Date('1999-5-5 14:5:6');
        console.log(date * 1);
        console.log(Number(date));
        console.log(date.valueOf());
        console.log(date.getTime());

        // 时间戳转化为ISO标准时间格式
        let dt = 925884306000;
        console.log(new Date(dt));
    </script>
</body>
</html>